import request from '@/utils/request'
// 获取权限列表
export const getPermissionListAPI = () => {
  return request({
    method: 'get',
    url: '/sys/permission'

  })
}
// 新增权限
export const addFormAPI = (permForm) => {
  console.log(permForm)
  return request({
    method: 'post',
    url: '/sys/permission',
    data: permForm
  })
}
// 获取权限点详情
export const getPermissionDetailListAPI = (id) => {
  return request({
    method: 'get',
    url: `/sys/permission/${id}`

  })
}
// 修改权限点详情
export const editPermissionDetailAPI = (permForm) => {
  return request({
    method: 'put',
    url: `/sys/permission/${permForm.id}`,
    data: permForm
  })
}
// 删除权限操作
export const delPermAPI = (id) => {
  return request({
    method: 'delete',
    url: `/sys/permission/${id}`
  })
}
